package com.applink.sell_proof.model;

import java.io.Serializable;

public class Tip implements Serializable {
	private static final long serialVersionUID = 1087619306461531500L;

	private String name;
	private long id;
	private String paragraph;
	private String fulltext;
	private long date;
	private boolean save;
	private Category category;

	public long getDate() {
		return date;
	}

	public void setDate(long date) {
		this.date = date;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getParagraph() {
		return paragraph;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public void setParagraph(String paragraph) {
		this.paragraph = paragraph;
	}

	public String getFulltext() {
		return fulltext;
	}

	public void setFulltext(String fulltext) {
		this.fulltext = fulltext;
	}

	public boolean isSave() {
		return save;
	}

	public void setSave(boolean save) {
		this.save = save;
	}

	public static enum Category {
		LEARN(85), LIFE_STYLE(86);
		private final int category;

		private Category(int category) {
			this.category = category;
		}

		@Override
		public String toString() {
			switch (category) {
			case 85:
				return "learn";
			case 86:
				return "lifestyle";
			default:
				break;
			}
			return null;
		}

		public static Category getCategory(int category) {
			switch (category) {
			case 85:
				return LEARN;
			case 86:
				return LIFE_STYLE;
			default:
				break;
			}
			return null;
		}

		public int toInt() {
			return category;
		}
	}
}
